/*河南星辰软件科技有限公司
@copyright Copyright (c) 2010~2022 All rights reserved.
*/
package cn.javaxc.crm.action.sale;
import java.io.*;
import java.util.*;
import java.sql.*;
import cn.javaxc.model.base.SQL;
import cn.javaxc.model.base.SQLList;
import cn.javaxc.model.base.SQLMap;
import cn.javaxc.model.base.SQLParam;
import cn.javaxc.model.page.BatisPage;
import cn.javaxc.mvcwork.controller.web.TreeBean;
import cn.javaxc.mvcwork.util.common.CommonUtil;
import cn.javaxc.mvcwork.util.common.MapListUtil;
import cn.javaxc.mvcwork.util.helper.FrameHelper;
import cn.javaxc.mvcwork.util.helper.TreeTableHelper;
import org.springframework.beans.factory.annotation.Autowired;
import cn.javaxc.system.action.base.BaseAction;
import cn.javaxc.crm.mapper.sale.FactoryInvMapper;
public class FactoryInv extends BaseAction
{
    @Autowired(required=false)
	private FactoryInvMapper mapper;
    /**
    工厂调查
    */
    
    public Map factoryInv() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_sur=mapper.s_sur(params);
        result.put("s_sur", s_sur);
        
        return result;
    }
    /**
    工厂调查
    */
    
    public Map factoryInvDet() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> firm_cap=mapper.firm_cap(params);
        result.put("firm_cap", firm_cap);
        
        return result;
    }
    /**
    工厂调查详情
    */
    
    public Map factoryInvDetdet() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> firm_cap=mapper.firm_cap(params);
        result.put("firm_cap", firm_cap);
        
        
        SQLList<SQLMap> t_surver=mapper.t_surver(params);
        SQLMap t_surver_emt=t_surver.getExistfirst();
        result.put("t_surver", t_surver_emt);
        
        
        SQLList<SQLMap> t_prolificacy=mapper.t_prolificacy(params);
        SQLMap t_prolificacy_emt=t_prolificacy.getExistfirst();
        result.put("t_prolificacy", t_prolificacy_emt);
        
        
        SQLList<SQLMap> t_res=mapper.t_res(params);
        SQLMap t_res_emt=t_res.getExistfirst();
        result.put("t_res", t_res_emt);
        
        
        SQLList<SQLMap> t_qua=mapper.t_qua(params);
        SQLMap t_qua_emt=t_qua.getExistfirst();
        result.put("t_qua", t_qua_emt);
        
        return result;
    }
    /**
    工厂调查修改
    */
    
    public Map factoryInvDetUpdate() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> firm_cap=mapper.firm_cap(params);
        result.put("firm_cap", firm_cap);
        
        
        SQLList<SQLMap> t_surver=mapper.t_surver(params);
        SQLMap t_surver_emt=t_surver.getExistfirst();
        result.put("t_surver", t_surver_emt);
        
        
        SQLList<SQLMap> t_prolificacy=mapper.t_prolificacy(params);
        SQLMap t_prolificacy_emt=t_prolificacy.getExistfirst();
        result.put("t_prolificacy", t_prolificacy_emt);
        
        
        SQLList<SQLMap> t_res=mapper.t_res(params);
        SQLMap t_res_emt=t_res.getExistfirst();
        result.put("t_res", t_res_emt);
        
        
        SQLList<SQLMap> t_qua=mapper.t_qua(params);
        SQLMap t_qua_emt=t_qua.getExistfirst();
        result.put("t_qua", t_qua_emt);
        
        return result;
    }
    /**
    */
    
    public Map d_sur() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.d_sur(params);
        
        return result;
    }
    /**
    工厂调查修改
    */
    
    public Map factoryInvDetSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        int CMID1 = mapper.CMID1(params);
        result.put("CMID1", CMID1);
        
        
        params.def("fileid",null);
        int i_qua = mapper.i_qua(params);
        result.put("i_qua", i_qua);
        
        
        int i_pro = mapper.i_pro(params);
        result.put("i_pro", i_pro);
        
        
        int i_res = mapper.i_res(params);
        result.put("i_res", i_res);
        
        return result;
    }
    /**
    工厂调查修改修改
    */
    
    public Map factoryInvDetUpdateSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.factoryInvDetUpdateSubmit(params);
        
        return result;
    }
    /**
    任务发布修改
    */
    
    public Map taskReleaseSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        Object useModuleId =
        mapper.useModuleId(params);
        result.put("useModuleId", useModuleId);
        
        
        Object client_name =
        mapper.client_name(params);
        result.put("client_name", client_name);
        
        
        n_update_work();
        
        return result;
    }
    /**
    增加检测流程任务
    */
    
    public Map n_update_work() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        Object CMIDplan_id =
        mapper.CMIDplan_id(params);
        result.put("CMIDplan_id", CMIDplan_id);
        
        
        int plan_work_id = mapper.plan_work_id(params);
        result.put("plan_work_id", plan_work_id);
        
        
        int phase_work_id = mapper.phase_work_id(params);
        result.put("phase_work_id", phase_work_id);
        
        
        int item_work_id = mapper.item_work_id(params);
        result.put("item_work_id", item_work_id);
        
        
        int skipid = mapper.skipid(params);
        result.put("skipid", skipid);
        
        
        Object CMIDitem_work_id =
        mapper.CMIDitem_work_id(params);
        result.put("CMIDitem_work_id", CMIDitem_work_id);
        
        
        mapper.n_update_work(params);
        
        return result;
    }
}